var tempData = [
		"/data/svn_code/couponrefund/1.0.0/couponrefund_1.0.0.tar.gz",
		"/data/svn_code/couponrefund/1.0.0/couponrefund_1.0.0.tar.gz.md5",
		"/data/svn_code/couponrefund/1.0.0/META-INF/MANIFEST.MF",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/web.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/mybatis-spring-1.1.1.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/aopalliance-1.0.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/slf4j-log4j12-1.7.2.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/aspectjweaver-1.7.1.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/CouponRefund.BLL-0.0.1-SNAPSHOT.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/fastjson-1.1.40.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/mybatis-3.1.1.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-beans-3.2.2.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/c3p0-0.9.1.2.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/jta-1.1.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-expression-3.2.2.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/httpclient-4.2.2.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/jodd-3.3.8.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/commons-codec-1.6.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/httpcore-4.2.2.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/slf4j-api-1.6.0.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/commons-logging-1.1.1.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-web-3.2.2.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/CouponRefund.DAL-0.0.1-SNAPSHOT.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/quartz-1.8.5.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/ChunBoCommonV2.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/mysql-connector-java-5.1.22.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/javax.servlet-api-3.0.1.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/log4j-1.2.17.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/lib/spring-context-3.2.2.RELEASE.jar",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/oscache.properties",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/Mybatis-config.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/log4j.properties",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/spring/applicationContext-dbinstance.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/spring/applicationContext-dao.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/spring/applicationContext-sqlsession.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/spring/applicationContext-mapper.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/spring/applicationContext-ds.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/spring/applicationContext-quartz.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/spring/applicationContext-chunbocommon.xml",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/configs/parameter.properties",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/configs/url.properties",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/configs/ds/ds.properties",
		"/data/svn_code/couponrefund/1.0.0/WEB-INF/classes/com/chunbo/Quartz/QuartzAPI.class" ];

function setTableHtml(container, jsonArr) {
	var resultStr = "<div class='col-md-6 col-md-offset-3'><div class='portlet-body'><div class='table-scrollable'><table class='table table-bordered table-hover'><thead><tr><th data-halign='center' data-align='center'>文件路径</th><th data-halign='center' data-align='center'>文件名</th><th data-halign='center' data-align='center'>操作</th></tr></thead><tbody>";
	var rowStr = "";
	var resultObj = {};
	jQuery(jsonArr).each(function() {
		var path = this.substring(0, this.lastIndexOf('/'));
		var fileName = this.substring(this.lastIndexOf('/') + 1);
		var full = this;
		var tempjson = resultObj[path];
		if (tempjson == null || tempjson.length <= 0 || tempjson == undefined) {
			var temparr = new Array();
			temparr.push(fileName);
			resultObj[path] = temparr;
		} else {
			tempjson.push(fileName);
			resultObj[path] = tempjson;
		}
	});
	var str = obj2str(resultObj);
	str = eval('(' + str + ')');
	for ( var k in str) {
		var v = str[k];
		var tempCount = 0;
		for ( var k2 in v) {
			if (tempCount == 0) {
				rowStr += "<tr><td rowspan='"
						+ v.length
						+ "'>"
						+ k
						+ "</td><td>"
						+ v[k2]
						+ "</td><td><input type='checkbox' name='filecheck' class='editor-active' value='"
						+ k + "/" + v[k2] + "'></td></tr>";
			} else {
				rowStr += "<tr><td>"
						+ v[k2]
						+ "</td><td><input type='checkbox' name='filecheck' class='editor-active' value='"
						+ k + "/" + v[k2] + "'></td></tr>";
			}
			tempCount++;
		}
		resultStr += rowStr;
		rowStr = "";
	}
	resultStr += "</tbody></table></div></div></div>";
	// alert(resultStr);
	jQuery(container).html("");
	jQuery(container).html(resultStr);
	jQuery(container).show();
}

function obj2str(o) {
	var r = [];
	if (typeof o == "string")
		return "\""
				+ o.replace(/([\'\"\\])/g, "\\$1").replace(/(\n)/g, "\\n")
						.replace(/(\r)/g, "\\r").replace(/(\t)/g, "\\t") + "\"";
	if (typeof o == "undefined")
		return "";
	if (typeof o == "object") {
		if (o === null)
			return "null";
		else if (!o.sort) {
			for ( var i in o)
				r.push("'" + i + "':" + obj2str(o[i]))
			r = "{" + r.join() + "}"
		} else {
			for (var i = 0; i < o.length; i++)
				r.push(obj2str(o[i]))
			r = "[" + r.join() + "]"
		}
		return r;
	}
	return o.toString();
}

jQuery("#mybutton").click(function() {
	jQuery("input:checkbox[name=filecheck]:checked").each(function() {
		alert(this.value);
	})
});
